/**********************************************************************************
// Game Title Source File
// 
// Creation:	04 Jun 2011
// Updated:		04 Jun 2011
// Compiler:	Visual Studio 2010
//
// Notes:		Title Screen for the game Space Race
//
**********************************************************************************/

#include "GameTitle.h"

/**********************************************************************************/
// constructor

GameTitle::GameTitle(int posX, int posY)
{
	titleScreen = new Sprite("Resources/TitleScreen.png");
	titleScreen->MoveTo(float(posX), float(posY));

	pressEnter = new Sprite("Resources/PressEnter.png", 200, 64, 1);
	pressEnter->MoveTo(float(posX), D3DGame::viewport.bottom - 100.0f);
	pressEnter->animation = new Animation(nullptr, 5, 180, true, 0, 0, ENDLESS);
}

/**********************************************************************************/
// destructor

GameTitle::~GameTitle()
{
	delete titleScreen;
	delete pressEnter->animation;
	delete pressEnter;
}

/**********************************************************************************/

void GameTitle::Logic()
{
	pressEnter->animation->NextFrame();
}

/**********************************************************************************/

void GameTitle::Draw()
{
	titleScreen->Draw();
	pressEnter->Draw();
}

/**********************************************************************************/